package com.tobeface.sns.domain;

import java.util.List;

import com.google.common.collect.Lists;

/**
 * 
 * @author loudyn
 * 
 */
public class UserGroup {

	private String name;
	private List<User> members = Lists.newLinkedList();

	/**
	 * 
	 * @param name
	 */
	UserGroup(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
	/**
	 * @param user
	 * @return
	 */
	UserGroup removeMember(User user){
		this.members.remove(user);
		return this;
	}
	/**
	 * @param user
	 * @return
	 */
	UserGroup addMember(User user) {
		this.members.add(user);
		return this;
	}
	
	List<User> getMember(){
		return members;
	}
}
